
#ifndef ROPUFU_FORMAT_MATSTREAM_HPP_INCLUDED
#define ROPUFU_FORMAT_MATSTREAM_HPP_INCLUDED

#include "../distributed/matrix.hpp"
#include "../distributed/trivial_grid.hpp"

#include <cstdint>
#include <string>

namespace ropufu
{
	namespace distributed
    {
        template <int t_mat_level>
        struct matstream_header
        {
            static const std::int32_t mat_level = t_mat_level;
        };

        template <int t_mat_level, typename TGrid = trivial_grid>
		struct matstream
        {
            static const std::int32_t mat_level = t_mat_level;
            typedef TGrid grid_type;
            typedef matstream<t_mat_level, grid_type> type;

            void clear();

            type& operator <<(const std::string& name);

            template <typename T>
            type& operator <<(const matrix<T>& mat);
		};
	}
}

#endif // ROPUFU_FORMAT_MATSTREAM_HPP_INCLUDED
